package com.yqd.lesson.actor.serven

import akka.actor.{ActorRef, ActorSystem, Props}
import akka.routing.{FromConfig, RoundRobinPool}

import scala.concurrent.duration._


object  Main extends App {

  val system = ActorSystem("akka");

  val sender: ActorRef = system.actorOf(Sender.props,"sender")

  var count = 0;
  import system.dispatcher
  system.scheduler.schedule(1.second,1.second){
    count += 1;
    println("record:" + count)
    sender ! "" + count
  }


}
